﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Upload.aspx.cs" Inherits="WebApplication.Admins.Upload" %>
<%@ Register Src="../Controls/UC_Pages.ascx" TagName="UC_Pages" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="Styles/AdminStyles.css" rel="stylesheet" type="text/css" />
    <script src="jquery/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function select(imageName) {
            window.opener.document.getElementById('<%=id %>').value = imageName;
            close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="upload">
        <asp:Label ID="lblStatus" runat="server" />
        <asp:Label Text="Image File:" ID="lblImageFile" AssociatedControlID="upImage" runat="server" />
        <asp:FileUpload ID="upImage" runat="server" />
        <asp:Button Text="Upload" ID="btnUpload" runat="server" 
            onclick="btnUpload_Click" />
        <hr />
        <uc1:UC_Pages ID="pagerTop" runat="server" Visible="false" />
        <div class="imageList">
            <asp:DataList ID="dlImage" runat="server" RepeatColumns="5"  RepeatDirection="Horizontal">
                <ItemTemplate>
                     <a href="javascript:void(0)" onclick="select('<%#Eval("Name") %>')">
                        <img src='<%#BLL.LinkBLL.ToTinTucImages(Eval("Name").ToString()) %>' alt="" />
                    </a>
                    <p>
                        <%#Eval("Name") %>
                    </p>
                </ItemTemplate>
            </asp:DataList>
        </div>
        <uc1:UC_Pages ID="pagerBottom" runat="server" Visible="false" />
    </div>
    </form>
</body>
</html>